package com.example.consultantprogress.aiServices;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        //代表AiService工具类在帮助ConsultantService创建代理对象是手动装配
        chatModel = "openAiChatModel",
        streamingChatModel = "openAiStreamingChatModel",
        //chatMemory = "chatMemory"
        chatMemoryProvider = "chatMemoryProvider",
        contentRetriever = "contentRetriever",
        tools = "reservationTool"
)
public interface ConsultantService {
    //用于聊天的方法
//    public String chat(String message);
    //@SystemMessage("你是洲哥的助手宋冰漫，人美心善有多金")
    @SystemMessage(fromResource = "system.txt")
    //@UserMessage("你是洲哥的助手宋冰漫，人美心善有多金{{msg}}")
    public Flux<String> chat(/*@V("msg")*/@MemoryId String memoryId, @UserMessage String message);
}
